<!DOCTYPE HTML>
<html>
<body>
<fieldset style="overflow:hidden; width:200px; height:200px;">
  <legend>Legend</legend>
<div style="display:grid; grid-template-columns: repeat(4,50px); grid-auto-rows: 20px;">
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
</div>
</fieldset>
<fieldset>
  <legend>Legend</legend>
<div style="display:grid; grid-auto-columns: 50px; grid-auto-rows: 20px;">
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
  <p>X
</div>
</fieldset>
</body>
</html>
